/*
 * Copyright (C) 2010 Wim Crols <twimpiex@gnx.be>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License Version 3
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

package be.gnx.event.consumer.receiver;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public abstract class EventProcessor {

	private List<EventProcessorEvents> eventProcessorEventsList = new ArrayList<EventProcessorEvents>();

	public abstract void eventReceived(Object event, String client);

	public void addEventProcessorEvents(
			EventProcessorEvents eventProcessorEvents) {
		eventProcessorEventsList.add(eventProcessorEvents);
	}

	public void eventReceived(Map<String, String> eventProperties,
			Object event, String client) {
		for (EventProcessorEvents eventProcessorEvents : eventProcessorEventsList) {
			eventProcessorEvents.eventReceived(eventProperties, event, client);
		}
	}

}
